// 接口类型声明

// 布局配置
export interface ThemeConfigState {
	isDrawer: boolean;
	primary: string;
	topBar: string;
	topBarColor: string;
	isTopBarColorGradual: boolean;
	menuBar: string;
	menuBarColor: string;
	isMenuBarColorGradual: boolean;
	columnsMenuBar: string;
	columnsMenuBarColor: string;
	isColumnsMenuBarColorGradual: boolean;
	isCollapse: boolean;
	isUniqueOpened: boolean;
	isFixedHeader: boolean;
	isFixedHeaderChange: boolean;
	isClassicSplitMenu: boolean;
	isLockScreen: boolean;
	lockScreenTime: number;
	isShowLogo: boolean;
	isShowLogoChange: boolean;
	isBreadcrumb: boolean;
	isTagsview: boolean;
	isBreadcrumbIcon: boolean;
	isTagsviewIcon: boolean;
	isCacheTagsView: boolean;
	isSortableTagsView: boolean;
	isShareTagsView: boolean;
	isFooter: boolean;
	isGrayscale: boolean;
	isInvert: boolean;
	isIsDark: boolean;
	isWartermark: boolean;
	wartermarkText: string;
	tagsStyle: string;
	animation: string;
	columnsAsideStyle: string;
	columnsAsideLayout: string;
	layout: string;
	isColumnsMenuHoverPreload: boolean;
	isRequestRoutes: boolean;
	globalTitle: string;
	globalViceTitle: string;
	globalI18n: string;
	globalViceTitleMsg: string;
	globalComponentSize: string;
	menuBarActiveColor: string;
	menuBarHoverColor: string;
	menuHover: string;
	menuActiveColor: string;
	menuHorizontalActiveColor:string;
	colorHeaderLogo: string;
	defautFontSize: string;
	pageColor: string;
}

// 路由列表
export interface RoutesListState {
	routesList: object[];
	isColumnsMenuHover: Boolean;
	isColumnsNavHover: Boolean;
}

// 路由缓存列表
export interface KeepAliveNamesState {
	keepAliveNames: string[];
	cachedViews: string[];
}

// TagsView 路由列表
export interface TagsViewRoutesState {
	tagsViewRoutes: Array<object>;
	isTagsViewCurrenFull: Boolean;
}

// 用户信息
export interface loginInfoState {
	userId: string | null | undefined;
	userType: string | null | undefined;
	orgId: string | null | undefined;
	parentId: string | null | undefined;
	userTypeDivision: string | null | undefined;
	orgCode: string | null | undefined;
	orgName: string | null | undefined;
	creditCode: string | null | undefined;
	bindFlag: boolean | null | undefined;
	idcard: string | null | undefined;
	cellphone: string | null | undefined;
}
export interface userInfoState {
	userId: string | null | undefined;
	userName: string | null | undefined;
	fullName: string | null | undefined;
	userType: string | null | undefined;
	userTypeName: string | null | undefined;
	userTypeDivision: string | null | undefined;
	orgCode: string | null | undefined;
	orgName: string | null | undefined;
	unitId: string | null | undefined;
	unitName: string | null | undefined;
	creditCode: string | null | undefined;
	appName: string | null | undefined;
	realFlag: boolean | null | undefined;
	expireMinute: number | null | undefined;
	labelList: Array<string> | null | undefined;
	loginInfoList: Array<loginInfoState> | null | undefined;
	areaCode: string | null | undefined;
	areaName: string | null | undefined;
	personId: number | null | undefined;
	cardType: string | null | undefined;
	idcard: string | null | undefined;
	email: string | null | undefined;
	cellphone: string | null | undefined;
	nikeName: string | null | undefined;
	sex: string | null | undefined;
	sexName: string | null | undefined;
	birthday: string | null | undefined;
	photoPath: string | null | undefined;
	routers: Array<object> | null | undefined;
	roles: Array<string> | null | undefined;
	systemPrivileges: Array<string> | null | undefined;
	orgIds: Array<string> | null | undefined;
	orgId: string | null | undefined;
	openId: string | null | undefined;
	appId: string | number | null | undefined;
	equipmentId: string | null | undefined;
	systemCode: string | null | undefined;
	systemName: string | null | undefined;
	version: string | null | undefined;
	equipmentType: string | null | undefined;
	loginType: string | null | undefined;
}
export interface UserState {
	userInfo: userInfoState | null | undefined;
	userId: string | null | undefined;
	userName: string | null | undefined;
	fullName: string | null | undefined;
	userType: string | null | undefined;
	routers: Array<object>;
	roles: Array<string>;
	systemPrivileges: Array<string>;
	orgIds: Array<string>;
	orgId: string | null | undefined;
	openId: string | null | undefined;
	appId: string |number | null | undefined;
	currentRouter: object | null | undefined;
	defaultSM4Key: string | null | undefined,//默认秘钥
	defaultSM2PublicKey: string | null | undefined,//默认公钥
	defaultSM2PrivateKey: string | null | undefined,//默认私钥
	loginTime: string | null | undefined,//登录时间
	loginIp: string | null | undefined,//登录ip
}

// 后端返回原始路由(未处理时)
export interface RequestOldRoutesState {
	requestOldRoutes: Array<Object>;
}

// 主接口(顶级类型声明)
export interface RootStateTypes {
	themeConfig: ThemeConfigState;
	routesList: RoutesListState;
	keepAliveNames: KeepAliveNamesState;
	tagsViewRoutes: TagsViewRoutesState;
	user: UserState;
	systemConfig: SystemConfigState;
	requestOldRoutes: RequestOldRoutesState;
}
export interface AmapConfigState {
	key: string;
	securityJsCode: string;
	version: string;
	plugins: Array<string>;
	AMapUI: object;
	Loca: object;
	area: string | null | undefined; //行政区划
	districtSearch: object;
	center: Array<number>; //初始化定位中心点
	viewMode: string | null | undefined;
	zoom: number;
	zooms: Array<number>;
	mapStyle: string | null | undefined;
	showLabel: boolean;
	pitchEnable: boolean;
	rotateEnable: boolean;
	pitch: number;
	rotation: number;
	buildingAnimation: boolean; //楼块出现是否带动画
	lockMapBounds: LockMapBoundsState | null | undefined; //设置地图显示范围
}
export interface LockMapBoundsState {
	northEast: Array<number>;
	southWest: Array<number>;
}
export interface SystemConfigState {
	amapConfig: AmapConfigState;
}
